package cn.ject.mcpserver.config;

import cn.ject.mcpserver.service.MianshiyaService;
import cn.ject.mcpserver.service.WeatherService;
import org.springframework.ai.tool.ToolCallbackProvider;
import org.springframework.ai.tool.method.MethodToolCallbackProvider;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author Administrator
 */
@Configuration
public class ToolCallbackProviderRegister {

//    @Bean
//    public ToolCallbackProvider weatherTools(WeatherService weatherService) {
//        return MethodToolCallbackProvider.builder().toolObjects(weatherService).build();
//    }

    @Bean
    public ToolCallbackProvider getQuestionSearch(MianshiyaService mianshiyaService) {
        return MethodToolCallbackProvider.builder().toolObjects(mianshiyaService).build();
    }

}
